﻿namespace EFS.DB.Parameters
{
	public class Parameter
	{
		/// GetNull
		public static System.Data.SqlClient.SqlParameter GetNull(System.String dbName)
		{
			return new System.Data.SqlClient.SqlParameter(dbName, System.DBNull.Value);
		}

		/// New
		public static System.Data.SqlClient.SqlParameter Get(
			System.String dbName,
			System.Object value)
		{
			// ret value
			System.Data.SqlClient.SqlParameter retValue = null;

			// check value
			if (null == value)
			{
				retValue = GetNull(dbName);
			}
			else
			{
				retValue = new System.Data.SqlClient.SqlParameter(dbName, value);
			}

			// ok
			return retValue;
		}
	}

}